package com.gwcloud.leetcode.tags.array;

/** 
* @ClassName   : Leetcode0674 
* @author      : ganwei 
* @date        : 2020年6月15日 
* @Description : TODO 
*/
public class Leetcode0674 {
    /**
     * -解题思路，滑动窗口
     */
	public int findLengthOfLCIS(int[] nums) {
		int max = 0;
		int len = nums.length;
		int start = 0, end = 0;
		while(start < len) {
			while(end + 1 < len && nums[end+1] > nums[end]) {
				end++;
			}
			max = Math.max(max, end-start+1);
			start = end + 1;
			end = start;
		}
		return max;
    }
    /**
     * -主函数
     */
    public static void main(String[] args) {
    	int[] nums = {2,2,2,2,2};
    	Leetcode0674 l0674 = new Leetcode0674();
    	System.out.println(l0674.findLengthOfLCIS(nums));
    }
}
